<!DOCTYPE html>
<html>
<head>
	<title>体重记录</title>
	<meta name="viewport" charset="utf-8" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<link rel="stylesheet" type="text/css" href="/css/pages/user/public.css">
	<link rel="stylesheet" type="text/css" href="/css/pages/user/health_info/list.css">
</head>
<body>
	<div class="list_title">
		<ul>
			<li>日期</li>
			<li>体重<br><span>(KG)</span></li>
			<li>BMI<br><span>(KG/M²)</span></li>
		</ul>
	</div>
	<div class="list_table">
		<table>
			@foreach($weights as $weight)
			<tr>
				<td>{{ date("m月d日",strtotime($weight['created_at'])) }}</td>
				<td>{{ $weight['weight'] }}</td>
				<td>{{ $weight['bmi'] }}</td>
			</tr>
			@endforeach
		</table>
	</div>
	<div class="create_bg">
		@if($hasRecord != null)
		<a href="/weight/update?id={{$hasRecord->id}}">
			<div class="create_btn">
				修改今天体重
			</div>
		</a>
		@else
		<a href="/weight/create">
			<div class="create_btn">
				添加今天体重
			</div>
		</a>
		@endif
	</div>
	
</body>
</html>